const state = {
  announcements: []
}

const mutations = {
  ADD_ANNOUNCEMENT: (state, announcement) => {
    state.announcements.unshift(announcement)
  }
}

const actions = {
  addAnnouncement({ commit }, announcement) {
    commit('ADD_ANNOUNCEMENT', announcement)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
} 